<template>
	<view>
		<view class="cell" v-for="item in 10" :key="item">
			<view class="top u-flex u-flex-between u-flex-y-center">
				<view class="name">{{schedule.name}}</view>
				<view class="money" :class="tabsStatus == 1 ? 'red' : 'black'">{{tabsStatus == 1 ? '+' : '-'}}{{$u.priceFormat(schedule.money,2)}}</view>
			</view>
			<view class="bottom u-flex u-flex-between u-flex-y-center m-t8">
				<view class="time">{{$u.timeFormat(schedule.time)}}</view>
				<view class="status" :class="'status-' + schedule.status" v-if="schedule.status">{{['成功','失败'][schedule.status - 1]}}</view>
			</view>
			<view class="line"></view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			tabsStatus:{
				type:[String,Number],
				default:1
			},
			schedule:{
				type:Object,
				default:() => ({})
			}
		},
		created() {
			console.log('balance-created')
		},
		data() {
			return {
				
			}
		}
	}
</script>

<style lang="scss">
	.cell {
		padding: 24rpx;
		padding-bottom: 0;
		background-color: #fff;
		&:first-of-type {
			border-top-left-radius: 16rpx;
			border-top-right-radius: 16rpx;
		}
		&:last-of-type {
			border-bottom-left-radius: 16rpx;
			border-bottom-right-radius: 16rpx;
		}
		.name {
			font-size: 30rpx;
			color:#111;
		}
		.time {
			font-size: 22rpx;
			color: #999;
		}
		.status {
			font-size: 22rpx;
		}
		.money {
			font-size: 30rpx;
		}
		.red {
			color: #FA5151;
		}
		.black {
			color: #111;
		}
		.status-1 {
			color: #00B578;
		}
		.status-2 {
			color: #FA5151;
		}
		.line {
			height: 2rpx;
			background: #F0F1F5;
			margin-top: 24rpx;
		}
	}
</style>